%{ 
int caracteres=0;

%}

%%
"a"     {printf("Letra 'a' leida %d\n", caracteres); caracteres++;}
"<"     {printf("Menor que %d\n", caracteres); caracteres++;}
">"     {printf("Mayor que %d\n", caracteres); caracteres++;}
.       caracteres++;       ;
%%